package com.srit.migration.business.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

import com.srit.base.bean.Page;
import com.srit.base.dao.SqlMapDao;
import com.srit.migration.business.bean.DbColumn;
import com.srit.migration.business.dao.DbColumnDao;

/**
 * @author guan
 * @by daoImpl.tem
 * 
 */
 @Service
public class DbColumnDaoImpl implements DbColumnDao {
	@Autowired(required = true)
	private SqlMapDao sqlMapDao;

	@Override
	public void save(DbColumn dbColumn) {
		sqlMapDao.save("DbColumn.save", dbColumn);
	}

	@Override
	public void update(DbColumn dbColumn) {
		sqlMapDao.update("DbColumn.save", dbColumn);
	}

	@Override
	public DbColumn getById(DbColumn dbColumn) {
		return (DbColumn) sqlMapDao.getById("DbColumn.getById", dbColumn.getId());
	}

	@Override
	public void delete(DbColumn dbColumn) {
		sqlMapDao.delete("DbColumn.delete", dbColumn);
	}

	@Override
	public void page(Page page) {
		sqlMapDao.queryForObject("DbColumn.page", page);
	}
	
	@Override
	public void batchSave(List<DbColumn> dbColumnList) {
		sqlMapDao.batchSave("DbColumn.batchSave", dbColumnList);

	}

	@Override
	public List list(Page page) {
		return sqlMapDao.queryForList("DbColumn.list", page);

	}

}
